package com.xx.ch08.demo.demo02;

import com.xx.ch08.demo.demo02.entity.User;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 许欣
 * 时间：2022/4/20 10:13
 * 描述：
 */
public class MyTest {
    @Test
    public void test(){
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext8.xml");
        User user=context.getBean("user",User.class);
        System.out.println(user.name);
    }
}
